﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Caliburn.Micro;
using Torrenter.Client.Main.Framework.Messages;

namespace Torrenter.Client.Main.ViewModels
{
    public class NotificationAreaViewModel : Screen, IHandle<NotificationMsg>
    {

        private BindableCollection<string> _logs = new BindableCollection<string>();

        public BindableCollection<string> Logs
        {
            get { return _logs; }
            set
            {
                _logs = value;
                NotifyOfPropertyChange(() => Logs);
            }
        }

        #region Implementation of IHandle<NotificationMsg>

        public void Handle(NotificationMsg message)
        {
            Logs.Insert(0,message.Message);
        }

        #endregion
    }
}
